import argparse
from ast import parse

def configure():

    parser = argparse.ArgumentParser()


    ## Config parameters for CMPSO.
    parser.add_argument('--NP', type=int, default=20, help='the population size for each swarm')
    parser.add_argument('--DsDim', type=int, default=500, help='the decision sapce dimesions')
    parser.add_argument('--OsDim', type=int, default=2, help='the objectiives space dimensions')
    parser.add_argument('--arc_size', type=int, default=100, help='the max size of archieve')
    parser.add_argument('--c1', type=float, default=4.0/3., help='the cof for c1 for the velocity update')
    parser.add_argument('--c2', type=float, default=4.0/3, help='the cof for c1 for the velocity update')
    parser.add_argument('--c3', type=float, default=4.0/3, help='the cof for c1 for the velocity update')
    parser.add_argument('--inertiaw', type=float, default=0.9, help='inertia weight is linearly decreasing from 0.9 to 0.4')
    parser.add_argument('--UpperEpsilon', type=float, default=0.15, help='the upperBound of epsilon')
    parser.add_argument('--UpperEpsVelocity', type=float, default=0.03, help='the upperBound for epsilon velcity')
    parser.add_argument('--LowerBound', type=float, default=1.0, help='the lowerBound for decision varable')
    parser.add_argument('--UpperBound', type=float, default=-1.0, help='the upppeBound for decision varable')
    parser.add_argument('--LowerVelocity', type=float, default=0.2, help='the lowerBound for particle velocity')
    parser.add_argument('--UpperVelocity', type=float, default=-0.2, help='the upppeBound for partilcle velcity')
    parser.add_argument('--FES', type=int, default=10000, help='the maximum evaluation function query times')

    parser.add_argument('--F1', type=float, default=0.5)
    parser.add_argument('--F2', type=float, default=0.5)
    parser.add_argument('--CR', type=float, default=0.6)
    parser.add_argument('--eps', type=float, default=0.05)
    parser.add_argument('--cross_rate', type=float, default=0.5)
    parser.add_argument('--mutation_rate', type=float, default=1/3072)

    ## Config parameters for Network
    parser.add_argument('--lr', type=float, default=0.1, help='the learning rate for the network')
    parser.add_argument('--epochs', type=int, default=200, help='training epochs')
    parser.add_argument('--batch_size', type=int, default=128, help='training batch size')
    parser.add_argument('--dataset', type=str, default='CIFAR-10', help='experiment dataset')
    parser.add_argument('--model_arch', type=str, default='ResNet18', help='model architecture')

    ## 
    parser.add_argument('--gpu_id', type=int, default=0, help='chose the GPU id')


    args = parser.parse_args()

    return args